<script setup lang="ts">
import { provide, ref } from "vue";

defineOptions({ name:"WebxForm" });
const props = defineProps({
  // 是否只读
  readonly:{ type:Boolean, default:false }
});
// 给子组件注入readonly
provide("readonly", props.readonly);
const aformRef = ref();

defineExpose({ aformRef })
</script>

<template>
  <div>
    <AForm ref="aformRef" v-bind="$attrs">
      <template v-for="(_, slotName) in $slots" #[slotName]="slotData">
         <slot :key="slotName" :name="slotName" v-bind="slotData" />
      </template>
    </AForm>
  </div>
</template>

<style lang="less" scoped></style>